package com.six.work.mapper;

import com.six.work.entity.Announcement;
import com.six.work.entity.AnnouncementView;
import com.six.work.entity.Applicant;
import com.six.work.entity.Swords;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface SwordsMapper {
    @Select("SELECT * FROM swords")
    List<Swords> findAllSwords();

    @Select("SELECT * from swords where word_id=#{word_id}")
    Swords SelectSwordsByID(Integer word_id);

    @Delete("DELETE from swords where word_id=#{word_id}")
    Integer DelSwordsByID(Integer word_id);

    @Insert("insert into swords (word_id,category,words,create_date) values(#{word_id},#{category},#{words},#{create_date})")
    Integer insertSwords(Swords swords);

    @Update("update swords set word_id=#{word_id},category=#{category},words=#{words},create_date=#{create_date} where word_id=#{word_id}")
    Integer updateSwords(Swords swords);


}
